From: Ewan Mellor Date: Wed, 8 Nov 2006 11:13:50 +0000 (+0000) Subject: Refresh the domain list on domain_start or domain_create. We need to do this X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15567^2~59 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=3756da027a71c65441479225259f825e8d4a58d3;p=xen.git Refresh the domain list on domain_start or domain_create. We need to do this so that the list of running domains is up-to-date for the name-uniqueness check. Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 2015ca7c4b..2b37145d54 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -769,6 +769,8 @@ class XendDomain: """ self.domains_lock.acquire() try: + self._refresh() + dominfo = XendDomainInfo.create(config) self._add_domain(dominfo) self.domain_sched_credit_set(dominfo.getDomid(), @@ -815,6 +817,8 @@ class XendDomain: """ self.domains_lock.acquire() try: + self._refresh() + dominfo = self.domain_lookup_nr(domid) if not dominfo: raise XendInvalidDomain(str(domid)) @@ -824,7 +828,6 @@ class XendDomain: dominfo.start(is_managed = True) - finally: self.domains_lock.release()